Optimal. Leaf size=222 \[ -\frac {b f p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(f g-e h)^2 (g+h x)}-\frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\frac {b^2 f^2 p^2 q^2 \log (g+h x)}{h (f g-e h)^2}-\frac {b f^2 p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (1+\frac {f g-e h}{h (e+f x)}\right )}{h (f g-e h)^2}+\frac {b^2 f^2 p^2 q^2 \text {Li}_2\left (-\frac {f g-e h}{h (e+f x)}\right )}{h (f g-e h)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.49, antiderivative size = 222, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 8, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2445, 2458,
2389, 2379, 2438, 2351, 31, 2495} \begin {gather*} \frac {b^2 f^2 p^2 q^2 \text {PolyLog}\left (2,-\frac {f g-e h}{h (e+f x)}\right )}{h (f g-e h)^2}-\frac {b f^2 p q \log \left (\frac {f g-e h}{h (e+f x)}+1\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h (f g-e h)^2}-\frac {b f p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(g+h x) (f g-e h)^2}-\frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\frac {b^2 f^2 p^2 q^2 \log (g+h x)}{h (f g-e h)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 2351
Rule 2379
Rule 2389
Rule 2438
Rule 2445
Rule 2458
Rule 2495
Rubi steps
\begin {align*} \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x)^3} \, dx &=\text {Subst}\left (\int \frac {\left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2}{(g+h x)^3} \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\text {Subst}\left (\frac {(b f p q) \int \frac {a+b \log \left (c d^q (e+f x)^{p q}\right )}{(e+f x) (g+h x)^2} \, dx}{h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\text {Subst}\left (\frac {(b p q) \text {Subst}\left (\int \frac {a+b \log \left (c d^q x^{p q}\right )}{x \left (\frac {f g-e h}{f}+\frac {h x}{f}\right )^2} \, dx,x,e+f x\right )}{h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}-\text {Subst}\left (\frac {(b p q) \text {Subst}\left (\int \frac {a+b \log \left (c d^q x^{p q}\right )}{\left (\frac {f g-e h}{f}+\frac {h x}{f}\right )^2} \, dx,x,e+f x\right )}{f g-e h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {(b f p q) \text {Subst}\left (\int \frac {a+b \log \left (c d^q x^{p q}\right )}{x \left (\frac {f g-e h}{f}+\frac {h x}{f}\right )} \, dx,x,e+f x\right )}{h (f g-e h)},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {b f p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(f g-e h)^2 (g+h x)}-\frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}-\text {Subst}\left (\frac {(b f p q) \text {Subst}\left (\int \frac {a+b \log \left (c d^q x^{p q}\right )}{\frac {f g-e h}{f}+\frac {h x}{f}} \, dx,x,e+f x\right )}{(f g-e h)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {\left (b f^2 p q\right ) \text {Subst}\left (\int \frac {a+b \log \left (c d^q x^{p q}\right )}{x} \, dx,x,e+f x\right )}{h (f g-e h)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {\left (b^2 f p^2 q^2\right ) \text {Subst}\left (\int \frac {1}{\frac {f g-e h}{f}+\frac {h x}{f}} \, dx,x,e+f x\right )}{(f g-e h)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {b f p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(f g-e h)^2 (g+h x)}+\frac {f^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (f g-e h)^2}-\frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\frac {b^2 f^2 p^2 q^2 \log (g+h x)}{h (f g-e h)^2}-\frac {b f^2 p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac {f (g+h x)}{f g-e h}\right )}{h (f g-e h)^2}+\text {Subst}\left (\frac {\left (b^2 f^2 p^2 q^2\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {h x}{f g-e h}\right )}{x} \, dx,x,e+f x\right )}{h (f g-e h)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {b f p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(f g-e h)^2 (g+h x)}+\frac {f^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (f g-e h)^2}-\frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 h (g+h x)^2}+\frac {b^2 f^2 p^2 q^2 \log (g+h x)}{h (f g-e h)^2}-\frac {b f^2 p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac {f (g+h x)}{f g-e h}\right )}{h (f g-e h)^2}-\frac {b^2 f^2 p^2 q^2 \text {Li}_2\left (-\frac {h (e+f x)}{f g-e h}\right )}{h (f g-e h)^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.26, size = 316, normalized size = 1.42 \begin {gather*} -\frac {\left (a-b p q \log (e+f x)+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2+\frac {2 b p q \left (a-b p q \log (e+f x)+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \left (h (e+f x) (e h-f (2 g+h x)) \log (e+f x)+f (g+h x) \left (h (e+f x)+f (g+h x) \log \left (\frac {f (g+h x)}{f g-e h}\right )\right )\right )}{(f g-e h)^2}+\frac {b^2 p^2 q^2 \left (h (e+f x) (e h-f (2 g+h x)) \log ^2(e+f x)-2 f^2 (g+h x)^2 \log \left (\frac {f (g+h x)}{f g-e h}\right )+2 f (g+h x) \log (e+f x) \left (h (e+f x)+f (g+h x) \log \left (\frac {f (g+h x)}{f g-e h}\right )\right )+2 f^2 (g+h x)^2 \text {Li}_2\left (\frac {h (e+f x)}{-f g+e h}\right )\right )}{(f g-e h)^2}}{2 h (g+h x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.18, size = 0, normalized size = 0.00 \[\int \frac {\left (a +b \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right )\right )^{2}}{\left (h x +g \right )^{3}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}\right )^{2}}{\left (g + h x\right )^{3}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a+b\,\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )\right )}^2}{{\left (g+h\,x\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________